<!DOCTYPE html>

<html>
    <head>
        <meta charset="UTF-8">
        <title>页面跳转</title>
    </head>
    <body>
        <p>在当前窗口的 history 中前进或后退</p>
        <button onclick="history.back()">Back</button>
        <button onclick="history.go(-1)">Go(-1)</button>
        <button onclick="history.go(-2)">Go(-2)</button>
        <button onclick="history.go(1)">Go(1)</button>
        <button onclick="history.go(2)">Go(2)</button>
        <button onclick="history.forward()">Forward</button>
    </body>
</html>